(define chars->integer
  (λ (chars-as-ints char-width)
    "Take a list of integers representing characters and
\"concattenate\". Treat those integers as bits. Shift and add them, to
get one longer sequence of bits. Treat that longer sequence of bits as
a single integer."
    (let iter ([chars° (cdr chars-as-ints)]
               [concattenated° (car chars-as-ints)])
      (cond
       [(null? chars°) concattenated°]
       [else
        (iter (drop chars° 1)
              (+ (bits-left-shift concattenated° char-width)
                 (first chars°)))]))))
